1. Field of the Invention
The present disclosure generally relates to image processing and, more particularly, to a technology for measuring line width of lines.
2. Description of the Related Art
When an image forming apparatus that employs an electrophotographic process is used for a long time, characteristics of units in the image forming apparatus change, and compared with an initial period, the lines to be printed (especially fine lines, which are thin lines) can become more fine. Therefore, technology exists to correct the line width of the lines to be printed. In this technology, a line width correction amount is determined by measuring the line width of a line to be printed by the image forming apparatus. Japanese Patent Application Laid-Open No. 11-108631 discusses a technology for measuring the line width of printed lines based on an image of lines read from a printed product in which lines have been printed. In this technology, the number of black pixels forming the line image is counted for a predetermined area including the read line image, and the line width is determined based on the sum of counted pixels.
As in the technology discussed in Japanese Patent Application Laid-Open No. 11-108631, processing can be speeded up more than when the number of black pixels is counted for the whole area of the line image.
To count the number of black pixels, each pixel in the image is binarized into black pixels and white pixels by comparing a pixel value with a threshold. In this case, the pixel value of the pixels may or may not exceed the threshold due to blur of the image during printing. Thus, a pixel can sometimes be a white pixel and sometimes a black pixel, so that the pixel is uncertain.
Since the technology discussed in Japanese Patent Application Laid-Open No. 11-108631 does not give any consideration to the degree of blur in the image, the number of pixels counted in the predetermined area can be less than the number of pixels indicated by the actual line width. Further, the finer the line width is, the greater the number of pixels is affected due to this image blur.
Specifically, for example, if an image of a line printed at a 4-pixel width, which is not affected much by blur, is binarized and the black pixels counted, since the degree of blur is small, the number of black pixels counted after the binarization does not decrease by that much. Consequently, the line width determined based on the number of black pixels is roughly equal to the actual line width.
However, if an image of a line printed at a 1-pixel width, which is more easily affected by blur, is binarized and the black pixels counted, since the number of pixels that happen to undergo white pixelation can increase from the binarization, the number of counted black pixels decreases. Consequently, the line width determined based on the counted number of black pixels is narrower than the actual line width.